package main

import (
	"fmt"
)

func main() {
	// defer 从函数结束位置依次向上调用 , 在 return 之前之前会执行所有 defer
	fmt.Println("First Print")
	defer fmt.Println("Second Print(defer)") // this is second print, but this is defer,will be last print
	defer fmt.Println("Third Print(defer)")  // defer`s exec is lower to higher, so this print will be before first defer print
	fmt.Println("Last Print")
}
